// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	12/29/2013 8:57:55 PM				
// -----------------------------

#ifndef _Vector2_h
#define _Vector2_h

#include "Defines.h"

namespace Flow
{
	
	struct Vector2
	{
	
		/* Constants */
		static const Vector2	Zero;
		static const Vector2	One;
		static const Vector2	UnitX;
		static const Vector2	UnitY;
	
		/* Datamembers */
		Float	x;
		Float	y;
	
		/* Constructors */
		Vector2();
		Vector2(Float X, Float Y);
	
		Vector2(const Vector2& refVector);
	
		Vector2& operator=(const Vector2& refVector);
	
		/* Comparison Operators */
		Bool operator==(const Vector2& refVector) const;
		Bool operator!=(const Vector2& refVector) const;
		Bool operator<(const Vector2& refVector) const;
		Bool operator>(const Vector2& refVector) const;
		Bool operator<=(const Vector2& refVector) const;
		Bool operator>=(const Vector2& refVector) const;
	
		/* Mathematical In-Place operators */
		Vector2& operator+=(const Vector2& refVector);
		Vector2& operator-=(const Vector2& refVector);
		Vector2& operator*=(Float fScalar);
		Vector2& operator/=(Float fScalar);
	
		/* Mathematical Out-Of-Place Operators */
		Vector2 operator+(const Vector2& refVector) const;
		Vector2 operator-(const Vector2& refVector) const;
		Vector2 operator-() const;
		Vector2 operator*(Float fScalar) const;
		Vector2 operator/(Float fScalar) const;
	
		/* Mathematical Friend Operators */
		friend Vector2 operator*(Float fScalar, const Vector2& refVector);
	
		/* Methods */
		Float		Length() const;
		Vector2		Normalized() const;
		Float		DotProduct(const Vector2& refVector) const;
		void		AsArray(Float arr[2]) const;
		Vector2		Lerp(const Vector2& other, Float alpha) const;
	
	};

	typedef Vector2 Point2;

}

#endif